#ifndef ROBOTPOSE_H
#define ROBOTPOSE_H

#include <QVector>
#include <QMap>

/**
  * @brief The RobotPose class is a simple container for a single pose of a Robot. Typically, this will be Troy, but
  * this allows a generalized framework that any future robots could also take advantage of.
  *
  * A robot's pose is a mapping of joint channels to joint angles. These channels are represented simply as arbitrary
  * integers, but subclasses could define names as either enumerations or as static constants.
  */
class RobotPose {
public:
    /**
      * Creates an empty RobotPose, with no joints.
      */
    RobotPose() {}
    /**
      * Destroys and deallocates the RobotPose and any memory subclasses have allocated
      */
    virtual ~RobotPose() {}

    /**
      * Checks whether the pose has a value for the indicated joint channel.
      *
      * @param channel
      */
    virtual bool hasJointAngle(int channel) const;
    /**
      * Gets the angle associated with the indicated joint channel.
      * Returns FLT_MAX if the joint doesn't exist in the pose.
      *
      * @param channel
      */
    virtual float jointAngle(int channel) const;
    /**
      * Sets the angle associated with a given joint channel for this pose.
      *
      * @param channel
      * @param theta
      */
    virtual void setJointAngle(int channel, float theta);
    /**
      * Gets a vector containing all joint channels the robot has associated with itself currently.
      */
    virtual QVector<int> joints() const;

private:
    QMap<int, float> jointMap;

};

#endif // ROBOTPOSE_H
